<template>
  <div class="app-container home">
    <div class="zc-content">

      <!-----------------内容------------------------>
      <div class="infor_div">

        <div class="infor">
          <div class="infor_item">
            <div class="infor_item_title">
              <i><img src="../images/title01.png" style="margin-bottom: -15px"> </i>
              <span id="dbtab1" class="dbSelect">需求信息</span>
              <span id="dbtab2">服务信息</span>
              <span id="dbtab3">活动培训</span>
              <span id="dbtab4">问卷调查</span>
              <span id="dbtab5">政策信息</span>
            </div>
            <ul class="infor_item_ul" id="divdbtab1" style="display:block">
              <li v-for="( item, index ) in  demandList " :key="index" v-if="demandList.length > 0">
                <i></i>
                <a @click="goDemandInfo"><label>{{ item.projectName }}</label></a>
                <p><span>{{ item.sendUnit }}</span>
<!--                  <font>{{ item.creationName }}</font>-->
                  <em>{{ getFormattedDate(item.creationTime) }} </em>
                </p>

              </li>
              <li v-if="demandList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divdbtab2">
              <li v-for="( item, index ) in  productList " :key="index" v-if="productList.length > 0">
                <i></i>
                <a @click="getProductInfo"><label>{{ item.productName }}</label></a>
                <p><span>{{ item.sendUnit }}</span>
<!--                  <font>{{ item.creationName }}</font>-->
                  <em>{{ getFormattedDate(item.creationTime) }} </em>
                </p>
              </li>
              <li v-if="productList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divdbtab3">
              <li v-for="( item, index ) in  activityList " :key="index" v-if="activityList.length > 0">
                <i></i>
                <a @click="getActivityInfo"><label>{{ item.activityName }}</label></a>
                <p><span>{{ item.organizationName }}</span>
<!--                  <font>{{ item.creationName }}</font>-->
                  <em>{{ getFormattedDate(item.creationTime) }} </em>
                </p>
              </li>
              <li v-if="activityList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divdbtab4">
              <li v-for="( item, index ) in  questionnaireList " :key="index" v-if="questionnaireList.length > 0">
                <i></i>
                <a @click="getQuestionInfo"><label>{{ item.questionnaireName }}</label></a>
                <p><span>{{ item.organizationName }}</span>
<!--                  <font>{{ item.creationName }}</font>-->
                  <em>{{ getFormattedDate(item.creationTime) }} </em>
                </p>
              </li>
              <li v-if="questionnaireList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divdbtab5">
              <li v-for="( item, index ) in  policyList " :key="index" v-if="policyList.length > 0">
                <i></i>
                <a @click="getPolicyInfo"><label>{{ item.policyThemes }}</label></a>
                <p><span>{{ item.organizationName }}</span>
<!--                  <font>{{ item.creationName }}</font>-->
                  <em>{{ getFormattedDate(item.creationTime) }} </em>
                </p>
              </li>
              <li v-if="policyList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
          </div>
          <!----2------->
          <div class="infor_item hangye">
            <div class="infor_item_title" style="position: relative;">
              <i><img src="../images/title02.png" style="margin-bottom: -15px"> </i>
              <span id="hytab1" class="dbSelect">行业动态</span>
              <span id="hytab2">新闻资讯</span>
              <span id="hytab3">政策法规</span>
              <div id="moreReleaseList">
                <a @click="goReleaseList">更多>></a>
              </div>
            </div>
            <ul class="infor_item_ul" id="divhytab1" style="display:block">
              <li v-for="(item, index) in industryList" :key="index" v-if="industryList.length > 0">
                <i></i>
                <a @click="handleView(item.id)"><label>{{ item.policyThemes }}</label></a>
                <p><span>{{ item.organizationName }}</span><em>{{ item.creationTime }} </em></p>
              </li>
              <li v-if="industryList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divhytab2">
              <li v-for="(item, index) in newsList" :key="index" v-if="newsList.length > 0">
                <i></i>
                <a @click="handleView(item.id)"><label>{{ item.policyThemes }}</label></a>
                <p><span>{{ item.organizationName }}</span><em>{{ item.creationTime }} </em></p>
              </li>
              <li v-if="newsList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
            <ul class="infor_item_ul" id="divhytab3">
              <li v-for="(item, index) in releaseList" :key="index" v-if="releaseList.length > 0">
                <i></i>
                <a @click="handleView(item.id)"><label>{{ item.policyThemes }}</label></a>
                <p><span>{{ item.organizationName }}</span><em>{{ item.creationTime }} </em></p>
              </li>
              <li v-if="releaseList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </li>
            </ul>
          </div>
          <!----3------->
          <div class="infor_item qiye">
            <div class="infor_item_title" style="position: relative;">
              <i><img src="../images/title03.png" style="margin-bottom: -15px"> </i>
              <span class="dbSelect">快速查询</span>
              <div id="moreWebsiteList">
                <a @click="goWebsiteList">更多>></a>
              </div>
            </div>
            <ul class="tab-two">
              <li class="tab-twoSelect" id="qytab1">政策服务</li>
              <li id="qytab2">信息服务</li>
              <li id="qytab3">资质荣誉</li>
            </ul>
            <ul class="qiye-infor tabInfor-two" id="divqytab1" style="display: block">
              <li v-for="(item, index) in managementPolicyList" :key="index" v-if="managementPolicyList.length > 0"><a
                  @click="goWebsiteDetail(item.websiteName)">{{ item.titleName }}</a></li>
              <div v-if="managementPolicyList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </div>
            </ul>
            <ul class="qiye-infor tabInfor-two" id="divqytab2">
              <li v-for="(item, index) in managementInfoList" :key="index" v-if="managementInfoList.length > 0"><a
                  @click="goWebsiteDetail(item.websiteName)">{{
                    item.titleName
                  }}</a></li>
              <div v-if="managementInfoList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </div>
            </ul>
            <ul class="qiye-infor tabInfor-two" id="divqytab3">
              <li v-for="( item, index ) in  managementQualificationsList " :key="index"
                v-if="managementQualificationsList.length > 0"><a @click="goWebsiteDetail(item.websiteName)">{{
                  item.titleName
                }}</a></li>
              <div v-if="managementQualificationsList.length == 0" style="text-align:center ;margin-top: 10px;">
                暂无数据
              </div>
            </ul>
          </div>
        </div>
        <!-----------------center------------------------>
        <div class="infor-center">
          <ul class="infor-menu">
            <li>
              <img src="../images/icon01.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon02.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon03.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon04.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon05.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon06.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon07.png"><label>订单管理</label>
            </li>
            <li>
              <img src="../images/icon08.png"><label>订单管理</label>
            </li>
          </ul>
        </div>
        <!-----------------center------------------------>
        <!-----------------bottom------------------------>
        <div class="infor infor-height">
          <!----1------->
          <div class="infor_item rongyu">
            <div class="infor_item_title">
              <i><img src="../images/title04.png" style="margin-bottom: -15px"> </i>
              <span class="dbSelect">荣誉展示</span>
              <div class="infor_item_title-right">
                <select style="margin-right: -20px" v-model="queryHonor.type" @change="handChange">
                  <option v-for="dict in type" :key="dict.dictValue" :value="dict.dictValue">{{ dict.dictLabel }}
                  </option>
                </select>
                <p>共<b>{{ this.honorTotal }}</b><em>个</em></p>
              </div>
            </div>
            <!------img------>
            <!-- <div class="piclist">
              <ul ref="listUl" class="listul">
              </ul>
              <div class="fydiv">
                <ul class="fenye">
                  <li class="prev"><a @click="getPage(0)" title="上一页">上一页</a></li>
                  <li class="next"><a @click="getPage(2)" title="下一页">下一页</a></li>
                </ul>
              </div>
            </div> -->
            <div class="piclist-id">
              <el-carousel :interval="9999999" :arrow="honorTotal > 6 ? 'always' : 'never'">
                <el-carousel-item v-for="item in honorList" :key="item">
                  <ul class="listul">
                    <li v-for="i in item.list">
                      <a title="" @click="openDialog(i.fileUrl)">
                        <img :src="i.fileUrl" alt="">
                      </a>
                      <span>{{ i.name }}</span>
                    </li>
                  </ul>
                </el-carousel-item>
              </el-carousel>
            </div>`
            <!--            <div class="rollBox">-->
            <!--              <div v-if="honorList.length > 6" class="LeftBotton" @mousedown="islGoUp()" @mouseup="islStopUp()"-->
            <!--                @mouseout="islStopUp()">-->
            <!--              </div>-->
            <!--              <div class="Cont" id="ISL_Cont" ref="ISL_Cont">-->
            <!--                <div class="ScrCont">-->
            <!--                  <div ref="listContainer" class="list-container">-->
            <!--                    <div ref="list1">-->
            <!--                      &lt;!&ndash; 图片列表 begin &ndash;&gt;-->
            <!--                      <div v-if="honorList.length >= 2">-->
            <!--                        <div v-for="( index, groupIndex ) in  Math.ceil(honorList.length / 2) " :key="groupIndex">-->
            <!--                          <div class="pic">-->
            <!--                            <a @click="openDialog(groupIndex * 2)" target="_blank"-->
            <!--                              v-if="honorList[groupIndex * 2].fileUrl !== null">-->
            <!--                              <img :src="honorList[groupIndex * 2].fileUrl">-->
            <!--                              <p>{{ honorList[groupIndex * 2].name }}</p>-->
            <!--                            </a>-->
            <!--                            <a @click="openDialog(groupIndex * 2 + 1)" target="_blank"-->
            <!--                              v-if="(groupIndex * 2 + 1) < honorList.length">-->
            <!--                              <img :src="honorList[groupIndex * 2 + 1].fileUrl">-->
            <!--                              <p>{{ honorList[groupIndex * 2 + 1].name }}</p>-->
            <!--                            </a>-->
            <!--                          </div>-->
            <!--                        </div>-->
            <!--                      </div>-->
            <!--                      <div v-else>-->
            <!--                        <div class="pic" v-if="honorList.length > 0">-->
            <!--                          <a @click="openDialog(0)" target="_blank" v-if="honorList[0].fileUrl !== null">-->
            <!--                            <img :src="honorList[0].fileUrl">-->
            <!--                            <p>{{ honorList[0].name }}</p>-->
            <!--                          </a>-->
            <!--                        </div>-->
            <!--                      </div>-->
            <!--                      &lt;!&ndash; 图片列表 end &ndash;&gt;-->
            <!--                    </div>-->
            <!--                    <div ref="list2" class="list"></div>-->
            <!--                  </div>-->
            <!--                </div>-->
            <!--              </div>-->
            <!--              <div v-if="honorList.length > 6" class="RightBotton" @mousedown="islGoDown()" @mouseup="islStopDown()"-->
            <!--                @mouseout="islStopDown()"></div>-->
            <!--            </div>-->
            <!-----img------->
          </div>
          <!----2------->
          <div class="infor_item">
            <div class="infor_item_title">
              <i><img src="../images/title05.png" style="margin-bottom: -15px"> </i>
              <span id="khtab1" class="dbSelect">最新进展记录</span>
              <span id="khtab2">待办信息</span>
            </div>
            <div class="kehu_item" id="divkhtab1" style="display:block">
              <ul class="tab-two">
                <li class="tab-twoSelect" id="hytab">客户信息</li>
                <li id="sjtab">商机信息</li>
                <li id="ghtab">公海信息</li>
                <li id="dxtab">电销信息</li>
              </ul>
              <div class="tabInfor-two kehu-infor" id="divhytab" style="display: block">
                <ul class="infor_item_ul" id="divkhui" style="display:block">
                  <li v-for="( item, index ) in  enterpriseFollowList " :key="index"
                    v-if="enterpriseFollowList.length > 0">
                    <i></i>
                    <a @click="goEnterpriseinfo"><label>{{ item.latestDevelopments }}</label></a>
                    <p><span>{{ item.enterpriseName }}</span>
                      <font>{{ item.logOperName }}</font>
                      <em>{{ item.followTime.substring(0, 10) }} </em>
                    </p>
                  </li>
                  <li v-if="enterpriseFollowList.length == 0" style="text-align:center ;margin-top: 10px;">
                    暂无数据
                  </li>
                </ul>
              </div>

              <div class="tabInfor-two kehu-infor" id="divsjtab">
                <ul class="infor_item_ul" id="divsjui" style="display:block">
                  <li v-for="( item, index ) in  businessFollowList " :key="index" v-if="businessFollowList.length > 0">
                    <i></i>
                    <a @click="goBusinessInfo"><label>{{ item.followlatest }}</label></a>
                    <p><span>{{ item.enterpriseName }}</span>
                      <font>{{ item.followName }}</font>
                      <em>{{ item.followTime.substring(0, 10) }} </em>
                    </p>
                  </li>
                  <li v-if="businessFollowList.length == 0" style="text-align:center ;margin-top: 10px;">
                    暂无数据
                  </li>
                </ul>
              </div>
              <div class="tabInfor-two kehu-infor" id="divghtab">
                <ul class="infor_item_ul" id="divghui" style="display:block">
                  <li v-for="( item, index ) in  highSeasFollowList " :key="index" v-if="highSeasFollowList.length > 0">
                    <i></i>
                    <a @click="goHighSeasInfo"><label>{{ item.lastRecord }}</label></a>
                    <p><span>{{ item.enterpriseName }}</span>
                      <font>{{ item.logopername }}</font>
                      <em>{{ item.followTime }} </em>
                    </p>
                  </li>
                  <li v-if="highSeasFollowList.length == 0" style="text-align:center ;margin-top: 10px;">
                    暂无数据
                  </li>
                </ul>
              </div>
              <div class="tabInfor-two kehu-infor" id="divdxtab">
                <ul class="infor_item_ul" id="divdxui" style="display:block">
                  <li v-for="( item, index ) in  electricFollowList " :key="index" v-if="electricFollowList.length > 0">
                    <i></i>
                    <a @click="goElectricInfo"><label>{{ item.lastRecord }}</label></a>
                    <p><span>{{ item.enterpriseName }}</span>
                      <font>{{ item.logOperName }}</font>
                      <em>{{ item.followTime }} </em>
                    </p>
                  </li>
                  <li v-if="electricFollowList.length == 0" style="text-align:center ;margin-top: 10px;">
                    暂无数据
                  </li>
                </ul>
              </div>
            </div>
            <div class="kehu_item" id="divkhtab2">
              22
            </div>

          </div>
          <!----3------->
          <div class="infor_item dingdan">
            <div class="infor_item_title">
              <i><img src="../images/title06.png" style="margin-bottom: -15px"> </i>
              <span class="dbSelect">订单信息</span>
            </div>
            <ul class="infor_item_ul" id="" style="display:block">
              <li><i></i>
                <a href=""><label>此处为订单信息内容单信息内容单信息内容单信息内容单信息内容单信息内容</label></a>
                <p><label>2023-10-12 12：30 </label></p>
              </li>
              <li><i></i>
                <a href=""><label>此处为订单信息内容单信息内容单信息内容单信息内容单信息</label></a>
                <p><label>2023-10-12 12：30 </label></p>
              </li>
              <li><i></i>
                <a href=""><label>国际合作高峰论坛将于10月17日至18日举行，主题为</label></a>
                <p><label>2023-10-12 12：30 </label></p>
              </li>
              <li><i></i>
                <a href=""><label>此处为订单信息内容单信息内容单</label></a>
                <p><label>2023-10-12 12：30 </label></p>
              </li>
              <li><i></i>
                <a href=""><label>此处为订单信息内容单信息内容单信息内容单信息内容</label></a>
                <p><label>2023-10-12 12：30 </label></p>
              </li>

            </ul>
          </div>
        </div>
        <!-----------------bottom------------------------>


      </div>
      <!-----------------内容------------------------>
    </div>
    <el-dialog title="查看发布信息" :visible.sync="open" width="750px" append-to-body>
      <el-form ref="form" :model="form" label-width="80px">
        <el-row>
          <el-col :span="22">
            <el-form-item label="主题：">{{ form.policyThemes }}</el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="22">
            <el-form-item label="原文网址：">
              <a @click="goWebsiteDetail(form.website)" style="color: #1890ff;">{{ form.website }}</a>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="22">
            <el-form-item label="发布类型：">
              <div v-if="form.sendType === '0'">行业动态</div>
              <div v-else-if="form.sendType === '1'">新闻资讯</div>
              <div v-else-if="form.sendType === '2'">政策法规</div>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="11">
            <el-form-item label="创建人：">{{ form.creationName }}</el-form-item>
          </el-col>
          <el-col :span="11">
            <el-form-item label="创建时间：">{{ form.creationTime }}</el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="22">
            <el-form-item label="内容：">{{ form.content }}</el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="附件：">
              <file-view :key="refreshKey" :type="fileType" :businessId="businessId"
                :businessCode="releaseFile"></file-view>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="配图：">
              <file-view :key="refreshKey" :type="fileType2" :businessId="businessId"
                :businessCode="releasePictrue"></file-view>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer" style="margin-top: 8px;">
        <el-button @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>
    <!-- Dialog 组件 -->
    <el-dialog :visible.sync="dialogVisible" title="荣誉资质预览" width="600px">
      <img :src="dialogImageUrl" alt="荣誉资质" width="500px">
    </el-dialog>
  </div>
</template>

<script>
import { listHighSeasFollow, listElectricFollow, listEnterpriseFollow, listBusinessFollow } from "@/api/enterprise/info";
// import {listElectricFollow } from "@/api/electric/electric";
// import {listHighSeasFollow, } from "@/api/highSeas/seas";
import { listManagement } from "@/api/website/website";
import { listReleaseManagement, getManagement } from "@/api/release/release";
import FileView from "@/components/FileView/index"
import "../indexCss/style.css";
import "../jquery";
import { listReleaseIndex } from "@/api/demand/release";
import { receiveList } from "@/api/product/release";
import { listTrainingRevice } from "@/api/activity/training";
import { receptionList } from "@/api/questionnaire/investigation";
import { listType, listManagementIndex } from "@/api/honor/management";
import { receiveListIndex } from "@/api/policy/release";
export default {
  name: "Index",
  dicts: ['release_type', 'certificate_type'],
  components: { FileView },
  data() {
    return {
      managementPolicyList: [],
      managementInfoList: [],
      managementQualificationsList: [],
      releaseList: [],
      newsList: [],
      industryList: [],
      enterpriseFollowList: [],
      businessFollowList: [],
      highSeasFollowList: [],
      electricFollowList: [],
      demandList: [],
      activityList: [],
      productList: [],
      questionnaireList: [],
      honorList: [],
      honorTotal: 0,
      policyList: [],
      dialogVisible: false,
      dialogImageUrl: '',
      // 版本号
      version: "3.8.5",
      open: false,
      fileType: 0,
      fileType2: 0,
      refreshKey: 0,
      releaseFile: "releaseFile",
      selectedCertificateType: null,
      releasePictrue: "releasePictrue",
      businessId: null,
      Speed: 1, // 速度(毫秒)
      Space: 1, // 每次移动(px)
      PageWidth: 140, // 翻页宽度
      fill: 0, // 整体移位
      MoveLock: false,
      MoveTimeObj: null,
      Comp: 0,
      form: {},
      AutoPlayObj: null,
      scrollWidth: 0,
      isMount: false,
      queryParams: {
        // pageNum: 1,
        // pageSize: 15
      },
      queryParamsWebsite: {
        pageNum: 1,
        pageSize: 30,
        publisherType: null
      },
      queryReleaseParams: {
        pageNum: 1,
        pageSize: 15,
        sendType: null,
      },
      queryParamCurrent: {
        pageNum: 1,
        pageSize: 15
      },
      type: [],

      queryHonor: {
        type: null,
        pageNum: 1,
        pageSize: 15
      },
    };
  },
  created() {
    //$("#divhytab").css("display","block");
    this.getWebsitePolicyList();
    this.getWebsiteInfoList();
    this.getWebsiteQualificationsList();
    this.getIndustryList();
    this.getReleaseList();
    this.getNewsList();
    this.getEnterpriseList();
    this.getBusinessFollowList();
    this.getHighSeasFollowList();
    this.getElectricFollowList();
    this.getDemandList();
    this.getProductList();
    this.getActivityList();
    this.getQuestionList();
    this.getHonorTypeList();
    this.getpolicyList();
  },
  mounted() {
    setInterval(() => {
      this.getWebsitePolicyList();
      this.getWebsiteInfoList();
      this.getWebsiteQualificationsList();
      this.getIndustryList();
      this.getReleaseList();
      this.getNewsList();
      this.getEnterpriseList();
      this.getBusinessFollowList();
      this.getHighSeasFollowList();
      this.getElectricFollowList();
      this.getDemandList();
      this.getProductList();
      this.getActivityList();
      this.getQuestionList();
      this.getHonorTypeList();
      this.getpolicyList();
    }, 1800000);
    this.scrollWidth = 840;
    this.isMount = true;
    console.log(this.dict.label.certificate_type);
    $(document).ready(function (e) {
      $(".infor_item_title span").click(function () {
        var getid = $(this).attr("id"); $(this).addClass("dbSelect"); $(this).siblings().removeClass("dbSelect");
        var getid = $(this).attr("id");
        var getdivid = "#div" + getid;
        $(getdivid).css("display", "block");
        $(getdivid).siblings(".infor_item_ul , .kehu_item").css("display", "none");
      });
      //2
      $(".tab-two li").click(function () {
        var getid = $(this).attr("id"); $(this).addClass("tab-twoSelect"); $(this).siblings().removeClass("tab-twoSelect");
        var getid = $(this).attr("id");
        var getdivid = "#div" + getid;
        $(getdivid).css("display", "block");
        $(getdivid).siblings(".tabInfor-two").css("display", "none");
      });
    });
  },
  methods: {
    getHonorTypeList() {
      listType().then(res => {
        this.type = res;
        this.queryHonor.type = this.type[0].dictValue;
        this.getHonorList();
      })
    },
    handChange() {
      this.getHonorList();
    },
    getHonorList() {
      //查询指定的数据
      listManagementIndex(this.queryHonor).then(res => {
        console.log(res.rows)
        console.log(res.rows.length)
        this.honorList = res.rows;
        console.log(this.honorList)
        this.honorTotal = res.total;
      })
    },
    openDialog(url) {
      this.dialogImageUrl = url;
      this.dialogVisible = true;
    },
    /**  查询调查问卷最新的15条记录 */
    getQuestionList() {
      receptionList(this.queryParamCurrent).then(res => {
        this.questionnaireList = res.rows;
      })
    },
    /** 查询客户最新进展信息列表 */
    getEnterpriseList() {
      listEnterpriseFollow(this.queryParams).then(response => {
        this.enterpriseFollowList = response.rows;
      });
    },
    getFormattedDate(dateStr) {
      const date = new Date(dateStr);
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');
      return `${year}-${month}-${day}`;
    },
    //查询通知活动前15条数据
    getActivityList() {
      listTrainingRevice(this.queryParamCurrent).then(res => {
        this.activityList = res.rows;
      })
    },
    /** 查询政策发布最新的15条记录 */
    getpolicyList() {
      receiveListIndex(this.queryParamCurrent).then(res => {
        this.policyList = res.rows;
      })
    },
    /** 查询需求信息最新的15条记录 */
    getDemandList() {
      listReleaseIndex(this.queryParamCurrent).then(res => {
        this.demandList = res.rows;
      })
    },
    /** 服务信息最新的15条记录 */
    getProductList() {
      receiveList(this.queryParamCurrent).then(res => {
        this.productList = res.rows;
      })
    },
    /** 查询商机最新进展信息列表 */
    getBusinessFollowList() {
      listBusinessFollow(this.queryParams).then(response => {
        this.businessFollowList = response.rows;
      });

    },
    /** 查询公海最新进展信息列表 */
    getHighSeasFollowList() {
      listHighSeasFollow().then(response => {

        this.highSeasFollowList = response;
      });

    },
    /** 查询电销最新进展信息列表 */
    getElectricFollowList() {
      listElectricFollow().then(response => {
        console.log(response)
        this.electricFollowList = response;
      });

    },
    //进展记录跳转到客户管理
    goEnterpriseinfo() {
      this.$router.push("/enterprise/enterpriseinfo?markAs=1");
    },
    //跳转到需求信息接收端
    goDemandInfo() {
      this.$router.push("/activityinfo/demandReception");
    },
    //跳转到产品信息接收端
    getProductInfo() {
      this.$router.push("/activityinfo/receiveManager/productReception");
    },
    //跳转到活动通知接受端
    getActivityInfo() {
      this.$router.push("/activityinfo/receiveManager/receive");
    },
    //跳转到问卷调查接收端
    getQuestionInfo() {
      this.$router.push("/activityinfo/receiveManager/reception")
    },
    //跳转到政策发布接收端
    getPolicyInfo() {
      this.$router.push("/activityinfo/receiveManager/policyReception")
    },
    //进展记录跳转到商机管理
    goBusinessInfo() {
      this.$router.push("/enterprise/sale/businessinfo");
    },
    //进展记录跳转到电销管理
    goElectricInfo() {
      this.$router.push("/enterprise/sale/electric");
    },
    //进展记录跳转到公海管理
    goHighSeasInfo() {
      this.$router.push("/enterprise/sale/highSeas");
    },
    getWebsitePolicyList() {
      this.queryParamsWebsite.publisherType = "0";
      listManagement(this.queryParamsWebsite).then(response => {
        this.managementPolicyList = response.rows;
        console.log(this.managementPolicyList)
      });
    },
    getWebsiteInfoList() {
      this.queryParamsWebsite.publisherType = "1";
      listManagement(this.queryParamsWebsite).then(response => {
        this.managementInfoList = response.rows;
      });
    },
    getWebsiteQualificationsList() {
      this.queryParamsWebsite.publisherType = "2";
      listManagement(this.queryParamsWebsite).then(response => {
        this.managementQualificationsList = response.rows;
      });
    },
    goWebsiteDetail(url) {
      if (!url.startsWith('http://') && !url.startsWith('https://')) {
        // 如果没有协议，添加默认的http://协议
        url = 'http://' + url;
      } window.open(url, '_blank');
    },
    getIndustryList() {
      this.queryReleaseParams.sendType = "0";
      listReleaseManagement(this.queryReleaseParams).then(response => {
        this.industryList = response.rows;
      });
    },
    getNewsList() {
      this.queryReleaseParams.sendType = "1";
      listReleaseManagement(this.queryReleaseParams).then(response => {
        this.newsList = response.rows;
      });
    },
    getReleaseList() {
      this.queryReleaseParams.sendType = "2";
      listReleaseManagement(this.queryReleaseParams).then(response => {
        this.releaseList = response.rows;
      });
    },
    handleView(id) {
      this.fileType = 2;
      this.fileType2 = 2;
      this.businessId = id;
      getManagement(id).then(response => {
        this.form = response.data;
        this.open = true;
      });
      this.refreshKey++;
    },
    goReleaseList() {
      this.$router.push("/releaseManagement?releaseAs=1");
    },
    goWebsiteList() {
      this.$router.push("/websiteManagement?websiteAs=1");
    },
    cancel() {
      this.open = false;
    },
    // getPage(pn){
    //   const dataCount=this.honorTotal;//总数据条数
    //   const pageSize=6;//每页显示条数
    //   var pageCount= Math.ceil(dataCount / pageSize);//总页数
    //   if(pn==0||pn>pageCount){
    //     return;
    //   }
    //   const ul = this.$refs.listUl;
    //   // console.log(ul)
    //   // ul.empty();
    //   //console.log(pageCount+"..."+pn)
    //   this.paintPage(pageCount,pn);   //绘制页码
    //   var startPage = pageSize * (pn - 1);

    // if (pageCount == 1) {     // 当只有一页时
    //   for (var j = 0; j < dataCount; j++) {
    //     var e = `<li><a href="page.html"><img :src="${this.honorList[j].fileUrl}"></a><p><span>荣誉展示${j}</span></p></li>`;
    //     ul.append(e);
    //   }
    // }else {      // 当超过一页时
    //   var e="";
    //   var endPage = pn<pageCount?pageSize * pn:dataCount;
    //   for (var j = startPage; j < endPage; j++) {
    //     var e = `<li><a href="page.html"><img :src="${this.honorList[j].fileUrl}"></a><p><span>荣誉展示${j}</span></p></li>`;
    //     ul.append(e);
    //   }
    // }
  },
  // paintPage(number,currNum){
  //   var pageUl=$(".fenye");
  //   pageUl.empty();
  //   var ulDetail="";
  //
  //   if(number==1){
  //     ulDetail= "<li class=\"prev\"><a href=\"javascript:void(0)\"></a></li>"+
  //
  //       "<li class=\"next\"><a href=\"javascript:void(0)\"></a></li>";
  //   }else{
  //     ulDetail= "<li class=\"prev\"><a href=\"javascript:getPage("+parseInt(currNum-1)+")\" title='上一页'>上一页</a></li>"+
  //
  //       "<li class=\"next\"><a href=\"javascript:getPage("+parseInt(currNum+1)+")\" title='下一页'>下一页</a></li>";
  //   }
  //
  //   $(".fenye").append(ulDetail);
  // },
  // choosele(num,cur){
  //   if(num==cur){
  //     return " choose";
  //   }else{
  //     return "";
  //   }
  // },
  // islGoUp() {
  //   if (this.MoveLock) return;
  //   clearInterval(this.AutoPlayObj);
  //   this.MoveLock = true;
  //   if (this.$refs.ISL_Cont.scrollLeft <= 0) {
  //     console.log("这时候的宽度是多少:" + this.scrollWidth);
  //     this.$refs.ISL_Cont.scrollLeft = this.scrollWidth - 280;
  //   }
  //
  //   this.ISL_ScrUp();
  //   this.MoveTimeObj = setInterval(this.ISL_ScrUp, this.Speed);
  // },
  // islStopUp() {
  //   clearInterval(this.MoveTimeObj);
  //   if (this.$refs.ISL_Cont.scrollLeft % this.PageWidth - this.fill !== 0) {
  //     this.Comp = this.fill - (this.$refs.ISL_Cont.scrollLeft % this.PageWidth);
  //     this.CompScr();
  //   } else {
  //     this.MoveLock = false;
  //   }
  //   this.AutoPlay();
  // },
  // ISL_ScrUp() {
  //   if (this.$refs.ISL_Cont.scrollLeft <= 0) {
  //     this.$refs.ISL_Cont.scrollLeft += this.$refs.list1.offsetWidth;
  //   }
  //   this.$refs.ISL_Cont.scrollLeft -= this.Space;
  //   // if (this.$refs.ISL_Cont.scrollLeft <= 0) {
  //   //   this.$refs.ISL_Cont.scrollLeft = this.scrollWidth;
  //   // }
  // },
  // islGoDown() {
  //   if (this.$refs.ISL_Cont.scrollLeft + 420 >= this.scrollWidth) {
  //     this.MoveLock = false;
  //     // this.$refs.ISL_Cont.scrollLeft = 0; // 回到第一张图片
  //     clearInterval(this.MoveTimeObj);
  //     if (this.MoveLock) return;
  //     this.MoveLock = true;
  //     this.ISL_ScrDown();
  //     return;
  //   }
  //   clearInterval(this.MoveTimeObj);
  //   if (this.MoveLock) return;
  //   clearInterval(this.AutoPlayObj);
  //   this.MoveLock = true;
  //   this.ISL_ScrDown();
  //   this.MoveTimeObj = setInterval(this.ISL_ScrDown, this.Speed);
  //   console.log("走完是多少:" + this.$refs.ISL_Cont.scrollLeft)
  //   console.log("这时候是多少:" + this.$refs.ISL_Cont.scrollLeft)
  // },
  // islStopDown() {
  //   clearInterval(this.MoveTimeObj);
  //   if (this.$refs.ISL_Cont.scrollLeft % this.PageWidth - this.fill !== 0) {
  //     this.Comp = this.PageWidth - (this.$refs.ISL_Cont.scrollLeft % this.PageWidth) + this.fill;
  //     this.CompScr();
  //   } else {
  //     this.MoveLock = false;
  //
  //     // 在停止滚动时检查是否需要重置滚动位置
  //     if (this.$refs.ISL_Cont.scrollLeft >= this.scrollWidth) {
  //       this.$refs.ISL_Cont.scrollLeft = 0; // 回到第一张图片
  //     }
  //
  //     this.AutoPlay();
  //   }
  // },
  // ISL_ScrDown() {
  //   this.MoveLock = true;
  //   const container = this.$refs.ISL_Cont;
  //   const list1 = this.$refs.list1;
  //   console.log("left:" + container.scrollLeft)
  //   console.log("clent:" + container.clientWidth)
  //   console.log("list-clent:" + list1.clientWidth)
  //   if (container.scrollLeft >= container.clientWidth) {
  //     container.scrollLeft = 0; // 回到第一张图片
  //     console.log("是否走进这个方法")
  //   }
  //   else {
  //     container.scrollLeft += this.Space;
  //   }
  //
  //   setTimeout(() => {
  //     this.MoveLock = false;
  //   }, this.Speed);
  // },
  // CompScr() {
  //   if (this.Comp === 0) {
  //     this.MoveLock = false;
  //     return;
  //   }
  //   let num;
  //   if (this.Comp < 0) {
  //     if (this.Comp < -this.Space) {
  //       this.Comp += this.Space;
  //       num = this.Space;
  //     } else {
  //       num = -this.Comp;
  //       this.Comp = 0;
  //     }
  //     this.$refs.ISL_Cont.scrollLeft -= num;
  //     setTimeout(this.CompScr, this.Speed);
  //   } else {
  //     if (this.Comp > this.Space) {
  //       this.Comp -= this.Space;
  //       num = this.Space;
  //     } else {
  //       num = this.Comp;
  //       this.Comp = 0;
  //     }
  //     this.$refs.ISL_Cont.scrollLeft += num;
  //     setTimeout(this.CompScr, this.Speed);
  //   }
  // },
  // AutoPlay() {
  //   clearInterval(this.AutoPlayObj);
  //   this.AutoPlayObj = setInterval(() => {
  //     this.islGoDown();
  //     this.islStopDown();
  //   }, 300000);
  // },
};
</script>

<style scoped lang="scss">
#moreReleaseList {
  font-size: 12px;
  width: 20%;
  position: absolute;
  right: -25px;
  top: 0;
  color: #0863F8;
}

#moreWebsiteList {
  font-size: 12px;
  width: 20%;
  position: absolute;
  right: -25px;
  top: 0;
  color: #0863F8;

  /*图片列表*/
  .piclist {
    width: 100%;
    overflow: hidden;
    padding-top: 1vh;
    position: relative;
  }

  .piclist .listul {
    width: 89.1%;
    overflow: hidden;
    float: left;
    margin-left: 6%;
  }

  .piclist .listul li {
    width: 28%;
    float: left;
    text-align: center;
    padding-top: 0.8vh;
    margin-left: 3.8%;
  }

  .piclist .listul li img {
    padding: 2px;
    background: #fff;
    border: 1px solid #ccc;
    display: block;
    margin: 0 auto;
    width: 100%;
    height: 9vh;
  }

  .piclist .listul li span {
    font-size: .8vw;
    color: #333;
    line-height: 3vh;
  }

  /*分页样式*/
  .piclist .fenye li a {
    display: block;
    text-indent: -9999px;
  }

  .piclist .prev {
    height: 2.8vh;
    width: .7vw;
    background: url(../images/ry-left.png) no-repeat;
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 43%;
    background-size: 100%;
  }

  .piclist .next {
    height: 2.8vh;
    width: .7vw;
    background: url(../images/ry-right.png) no-repeat;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 43%;
    background-size: 100%;
  }

  .piclist .next {
    height: 2.8vh;
    width: .7vw;
    background: url(../images/ry-right.png) no-repeat;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 43%;
    background-size: 100%;
  }

}

.piclist-id {
  width: 100%;
  height: 26.5vh;
  margin-top: 1vh;
}

.piclist-id .listul {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  padding: 0 2.8vw;
  justify-content: space-between;
}

.piclist-id .listul li {
  margin-top: .4vh;
  width: 6.15vw;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
}

.piclist-id .listul li a {
  width: 100%;
}

.piclist-id .listul li a>img {
  width: 100%;
  height: 4.38vw;
}

::v-deep .piclist-id .el-carousel {
  height: 100%;
  width: 100%;
}

::v-deep .piclist-id .el-carousel .el-carousel__container {
  height: 100%;
  width: 100%;

  .piclist .next {
    height: 2.8vh;
    width: .7vw;
    background: url(../images/ry-right.png) no-repeat;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 43%;
    background-size: 100%;
  }

}

.piclist-id {
  width: 100%;
  height: 26.5vh;
  margin-top: 1vh;
}

.piclist-id .listul {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  padding: 0 2.8vw;
}

.piclist-id .listul li {
  margin-top: .4vh;
  width: 33.33%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
}

.piclist-id .listul li a {
  width: 100%;
  width: 6.15vw;
}

.piclist-id .listul li a>img {
  width: 100%;
  height: 4.38vw;
}

::v-deep .piclist-id .el-carousel {
  height: 100%;
  width: 100%;
}

::v-deep .piclist-id .el-carousel .el-carousel__container {
  height: 100%;
  width: 100%;
}

.piclist-id {
  width: 100%;
  height: 26.5vh;
  margin-top: 1vh;
}

.piclist-id .listul {
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  padding: 0 2.8vw;
}

.piclist-id .listul li {
  margin-top: .4vh;
  width: 33.33%;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
}

.piclist-id .listul li a {
  width: 100%;
  width: 6.15vw;
}

.piclist-id .listul li a>img {
  width: 100%;
  height: 4.38vw;
}

::v-deep .piclist-id .el-carousel {
  height: 100%;
  width: 100%;
}

::v-deep .piclist-id .el-carousel .el-carousel__container {
  height: 100%;
  width: 100%;
}

::v-deep .piclist-id .el-carousel__arrow--left {
  left: 0;
}

::v-deep .piclist-id .el-carousel__arrow--right {
  right: 0;
}
</style>


